巨人弹幕[弹].js 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209
  1. globalThis.h_ost = 'http://118.107.41.134:35555/';
  2. var key = CryptoJS.enc.Base64.parse("ZGMzMjUwNmQ5YjVjYmY4ZQ==");
  3. var iv = CryptoJS.enc.Base64.parse("ZGMzMjUwNmQ5YjVjYmY4ZQ==");
  4. globalThis.AES_Decrypt = function(word) {
  5. try {
  6. var decrypt = CryptoJS.AES.decrypt(word, key, {
  7. iv: iv,
  8. mode: CryptoJS.mode.CBC,
  9. padding: CryptoJS.pad.Pkcs7,
  10. });
  11. const decryptedText = decrypt.toString(CryptoJS.enc.Utf8);
  12. if (!decryptedText) {
  13. throw new Error("解密后的内容为空");
  14. }
  15. return decryptedText;
  16. } catch (e) {
  17. console.error("解密失败:", e);
  18. return null;
  19. }
  20. };
  21. globalThis.AES_Encrypt = function(word) {
  22. var encrypted = CryptoJS.AES.encrypt(word, key, {
  23. iv: iv,
  24. mode: CryptoJS.mode.CBC,
  25. padding: CryptoJS.pad.Pkcs7
  26. });
  27. return encrypted.toString();
  28. };
  29. globalThis.vod1 = function(t, pg) {
  30. let html1 = request(h_ost + 'api.php/getappapi.index/typeFilterVodList', {
  31. body: {
  32. area: '全部',
  33. year: '全部',
  34. type_id: t,
  35. page: pg,
  36. sort: '最新',
  37. lang: '全部',
  38. class: '全部'
  39. },
  40. headers: {
  41. 'User-Agent': 'okhttp/3.14.9',
  42. 'Content-Type': 'application/x-www-form-urlencoded'
  43. },
  44. 'method': 'POST'
  45. }, true);
  46. let html = JSON.parse(html1);
  47. return (AES_Decrypt(html.data));
  48. }
  49. globalThis.vodids = function(ids) {
  50. let html1 = fetch(h_ost + 'api.php/getappapi.index/vodDetail', {
  51. method: 'POST',
  52. headers: {
  53. 'User-Agent': 'okhttp/3.14.9',
  54. 'Content-Type': 'application/x-www-form-urlencoded'
  55. },
  56. body: {
  57. vod_id: ids,
  58. }
  59. });
  60. let html = JSON.parse(html1);
  61. const rdata = JSON.parse(AES_Decrypt(html.data));
  62. const data = {
  63. vod_id: ids,
  64. vod_name: rdata.vod.vod_name,
  65. vod_remarks: rdata.vod.vod_remarks,
  66. vod_actor: rdata.vod.vod_actor,
  67. vod_director: rdata.vod.vod_director,
  68. vod_content: rdata.vod.vod_content,
  69. vod_play_from: '',
  70. vod_play_url: ''
  71. };
  72. rdata.vod_play_list.forEach((value) => {
  73. data.vod_play_from += value.player_info.show + '$$$';
  74. value.urls.forEach((v) => {
  75. data.vod_play_url += v.name + '$' + value.player_info.parse + '|' + v.url + '#';
  76. });
  77. data.vod_play_url += '$$$';
  78. });
  79. return data;
  80. }
  81. //搜索
  82. globalThis.ssvod = function(wd) {
  83. var html1 = fetch(h_ost + 'api.php/getappapi.index/searchList', {
  84. method: 'POST',
  85. headers: {
  86. 'User-Agent': 'okhttp/3.14.9',
  87. 'Content-Type': 'application/x-www-form-urlencoded'
  88. },
  89. body: {
  90. keywords: wd,
  91. typepage_id: 1,
  92. }
  93. });
  94. let html = JSON.parse(html1);
  95. return AES_Decrypt(html.data);
  96. }
  97. //解析
  98. globalThis.jxx = function(id, url) {
  99. /* if(""!=='104847347'){
  100. return 'https://mp4.ziyuan.wang/view.php/3c120366111dde9c318be64962b5684f.mp4';
  101. }*/
  102. if (id.startsWith('http')) {
  103. return {
  104. parse: 1,
  105. url: id + url,
  106. jx: 0,
  107. danmaku: 'http://dm.sds11.top/tdm.php?url=' + url
  108. };
  109. }
  110. if (id == 0) {
  111. return {
  112. parse: 0,
  113. url: id + url,
  114. jx: 1,
  115. danmaku: 'http://dm.sds11.top/tdm.php?url=' + url
  116. };
  117. }
  118. let html1 = request(h_ost + 'api.php/getappapi.index/vodParse', {
  119. method: 'POST',
  120. headers: {
  121. 'User-Agent': 'okhttp/3.14.9',
  122. 'Content-Type': 'application/x-www-form-urlencoded'
  123. },
  124. body: {
  125. parse_api: id,
  126. url: AES_Encrypt(url),
  127. }
  128. });
  129. let html = AES_Decrypt(JSON.parse(html1).data);
  130. console.log(html);
  131. let decry = html.replace(/\n/g, '').replace(/\\/g, '');
  132. let matches = decry.match(/"url":"([^"]+)"/);
  133. if (!matches || matches[1] === null) {
  134. matches = decry.match(/"url": "([^"]+)"/);
  135. }
  136. return {
  137. parse: 0,
  138. url: matches[1],
  139. jx: 0,
  140. danmaku: 'http://dm.sds11.top/tdm.php?url=' + matches[1]
  141. };
  142. }
  143. var rule = {
  144. title: '巨人',
  145. host: '',
  146. detailUrl: 'fyid',
  147. searchUrl: '**',
  148. url: 'fyclass',
  149. searchable: 2,
  150. quickSearch: 1,
  151. filterable: 0,
  152. class_name: '电影&电视剧&综艺&动漫',
  153. class_url: '1&2&3&4',
  154. play_parse: true,
  155. lazy: $js.toString(() => {
  156. const parts = input.split('|');
  157. input = jxx(parts[0], parts[1]);
  158. }),
  159. 推荐: $js.toString(() => {
  160. let data = vod1(0, 0);
  161. let bata = JSON.parse(data).recommend_list;
  162. bata.forEach(it => {
  163. d.push({
  164. url: it.vod_id,
  165. title: it.vod_name,
  166. img: it.vod_pic,
  167. desc: it.vod_remarks
  168. });
  169. });
  170. setResult(d);
  171. }),
  172. 一级: $js.toString(() => {
  173. let data = vod1(input, MY_PAGE);
  174. let bata = JSON.parse(data).recommend_list;
  175. bata.forEach(it => {
  176. d.push({
  177. url: it.vod_id,
  178. title: it.vod_name,
  179. img: it.vod_pic,
  180. desc: it.vod_remarks
  181. });
  182. });
  183. setResult(d);
  184. }),
  185. 二级: $js.toString(() => {
  186. console.log("调试信息2" + input);
  187. let data = vodids(input);
  188. //console.log(data);
  189. VOD = data;
  190. }),
  191. 搜索: $js.toString(() => {
  192. let data = ssvod(input);
  193. let bata = JSON.parse(data).search_list;
  194. bata.forEach(it => {
  195. d.push({
  196. url: it.vod_id,
  197. title: it.vod_name,
  198. img: it.vod_pic,
  199. desc: it.vod_remarks
  200. });
  201. });
  202. // console.log(data);
  203. setResult(d);
  204. }),
  205. }